// ===============================================
// auth_guard
// 
// Create by Will on 2020/10/5 5:09 PM
// Copyright @flutter_base.All rights reserved.
// ===============================================

import 'package:auto_route/auto_route.dart';
import 'package:provider/provider.dart';


class AuthGuard extends RouteGuard {
  @override
  Future<bool> canNavigate(
      ExtendedNavigatorState<RouterBase> navigator,
      String routeName,
      Object arguments,
      ) async {

    // final userProvider = Provider.of<AppUserProvider>(
    //   navigator.context,
    //   listen: false,
    // );
    // final user = userProvider.value;
    // final canNavigate = user != null;
    //
    // if (canNavigate == false) {
    //   navigator.push(Routes.signInPage);
    // }
    // return canNavigate;

    return true;
  }
}
